<%@ page language="java" contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String showTitle = request.getParameter("showTitle");
%>
<style>
</style>
<div class="sys-portlet">
	<%if(showTitle != null && showTitle.equals("1")){ %>
	<div class="sys-title1 sys-title-bg1">
		<span class="sys-title-txt1 sys-title-txtbg sys-title-color1">
			<img class="sys-title-ico" src="<%=path %>/res/themes/${sessionScope.SESSION_STREET_THEME.thStyle}/imgs/ico_news.gif" />
			<s:property value="#parameters.title"/>
		</span>
		<div class="sys-more sys-more-ico1" onclick="location.href='<%=path %>/<s:property value="domain"/>/msg/list/<s:property value="msgType"/>'"><div></div></div>
	</div>
	<%} %>
	<div class="portlet-body">
		<script type="text/javascript">
			var pics  = "";
			var links = "";
			var texts = "";
			<s:iterator var="msg" value="picMsgList">
				pics  += '<%=path %><s:property value="#msg.msgCover"/>|';
				links += '<%=path %>/<s:property value="domain"/>/msg/item/<s:property value="#msg.msgType"/>/<s:property value="#msg.msgId"/>|';
				texts += '<s:property value="#msg.msgTitle"/>|';
			</s:iterator>

			if(!pics) pics = "<%=path %>/res/imgs/default_pic.jpg";
			if(!links) links = "";
			if(!texts) texts = "";

			if(pics.lastIndexOf("|") > 0) pics = pics.substring(0, pics.lastIndexOf("|"));
			if(links.lastIndexOf("|") > 0) links = links.substring(0, links.lastIndexOf("|"));
			if(texts.lastIndexOf("|") > 0) texts = texts.substring(0, texts.lastIndexOf("|"));
			
			var focus_width=560;
			var focus_height=250;
			var text_height=20;
			var swf_height = focus_height+text_height; 
			 
			document.write('<object type="application/x-shockwave-flash" data="<%=path %>/res/imgs/slideshow.swf" ');
			document.write('width="' + focus_width + '" height="' + swf_height + '">');
			document.write('<param name="movie" value="<%=path %>/res/imgs/slideshow.swf" />');
			document.write('<param name="allowScriptAcess" value="sameDomain" />');
			document.write('<param name="quality" value="best" />');
			document.write('<param name="bgcolor" value="#E5ECF4" />');
			document.write('<param name="scale" value="noScale" />');
			document.write('<param name="menu" value="false">');
			document.write('<param name="wmode" value="opaque" />');
			document.write('<param name="FlashVars" value="playerMode=embedded&pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" />');
			document.write('</object>');
		</script>
	</div>
</div>